/****************************************************************************
 *
 * Copyright (C) 2003-2008 Los Alamos National Security, LLC
 *                         Packet Analytics Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License Version 2 as
 * published by the Free Software Foundation.  You may not use, modify or
 * distribute this program under any other version of the GNU General
 * Public License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 ****************************************************************************/
package nfse;



/************
 * This data structure stores infomation about
 * gloabl fields in the system metadata.
 * 
 * @author 
 *
 * This code is the property of Los Alamos National Laboratory
 * and the University of California, Copyright 2005
 */
public class GlobalField {
	
    /***********
     * The name of this field (e.g. srcip, dstport)
     */
    private String name = "";
	
    /*********
     * A short description of the field
     */
    private String description = "";
    
    /*************
     * Length of the field when stored as a hex-encoded String; used for b+ tree indexing
     */
	private int length = 0;
	
	/******
	 * The identifier of this field from the system metadata
	 */
	private int id = -1;
	
	public String toString() {
		return getName() + ": " + getId() + ", " + getLength() + ", " + getDescription();	
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param length the length to set
	 */
	public void setLength(int length) {
		this.length = length;
	}

	/**
	 * @return the length
	 */
	public int getLength() {
		return length;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
}
